package com.wodsy.phoenix.dataobject.payc.model;

import java.util.Date;
import javax.persistence.*;

import com.wodsy.phoenix.dataobject.base.PhoenixObject;
import com.wodsy.phoenix.dataobject.base.PhoenixResponse;
import org.hibernate.annotations.GenericGenerator;

/**
 * TbPayWater entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "tb_pay_water", catalog = "payc")
public class PayWater extends PhoenixObject implements PhoenixResponse {

	// Fields

	private Long id;
	private Long tradeQuotationId;
	private Integer money;
	private Status status;
	private String tradeIdThird;
	private PayType payType;
	private Date createTime;
	private Date updateTime;

	// Constructors

	/** default constructor */
	public PayWater() {
	}

	/** minimal constructor */
	public PayWater(Long tradeQuotationId, Integer money, Status status,
                    PayType payType, Date createTime) {
		this.tradeQuotationId = tradeQuotationId;
		this.money = money;
		this.status = status;
		this.payType = payType;
		this.createTime = createTime;
	}

	/** full constructor */
	public PayWater(Long tradeQuotationId, Integer money, Status status,
                    String tradeIdThird, PayType payType, Date createTime) {
		this.tradeQuotationId = tradeQuotationId;
		this.money = money;
		this.status = status;
		this.tradeIdThird = tradeIdThird;
		this.payType = payType;
		this.createTime = createTime;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "increment")
	@Id
	@GeneratedValue(generator = "generator")
	@Column(name = "id", unique = true, nullable = false)
	public Long getId() {
		return this.id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	@Column(name = "trade_quotation_id", nullable = false)
	public Long getTradeQuotationId() {
		return this.tradeQuotationId;
	}

	public void setTradeQuotationId(Long tradeQuotationId) {
		this.tradeQuotationId = tradeQuotationId;
	}

	@Column(name = "money", nullable = false)
	public Integer getMoney() {
		return this.money;
	}

	public void setMoney(Integer money) {
		this.money = money;
	}

	@Column(name = "status", nullable = false)
    @Enumerated
	public Status getStatus() {
		return this.status;
	}

	public void setStatus(Status status) {
		this.status = status;
	}

	@Column(name = "trade_id_third")
	public String getTradeIdThird() {
		return this.tradeIdThird;
	}

	public void setTradeIdThird(String tradeIdThird) {
		this.tradeIdThird = tradeIdThird;
	}

	@Column(name = "pay_type", nullable = false)
    @Enumerated
    public PayType getPayType() {
		return this.payType;
	}

	public void setPayType(PayType payType) {
		this.payType = payType;
	}

	@Column(name = "create_time", nullable = false, length = 19)
	public Date getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public static enum Status {

        /**未支付*/
        PENDING,
        /**已支付*/
        SUCCESS
    }
    public static enum PayType {
        /**支付宝*/
        ALIPAY,
        /**联动优势*/
        UMPAY
    }
}

